package 泛型;

import java.lang.reflect.Field;
//编译完后会把泛型擦除,但是如果声明泛型时指定了上限或下限,就会改成上限或上限的类型
public class 泛型擦除 {
    public static void main(String[] args) {
        橡皮擦<Integer> 橡皮擦 = new 橡皮擦<Integer>();
        Class<? extends 橡皮擦> aClass = 橡皮擦.getClass();
        Field[] declaredFields = aClass.getDeclaredFields();
        for (Field declaredField : declaredFields) {
            System.out.println(declaredField.getType()+" "+declaredField.getType().getSimpleName());
        }
    }
}
